<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>${requestScope.ARTICLE.articleTitle}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="${ctx}/js/jquery-1.4a2.min.js"></script>
		<link rel="stylesheet" type="text/css"
			href="${ctx}/gallery/jquery.ad-gallery.css" />
		<script type="text/javascript"
			src="${ctx }/gallery/jquery.ad-gallery.js"></script>
		<script type="text/javascript">
			  $(function() {
			    $('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.<br>And it contains <strong>H</strong>ow <strong>T</strong>o <strong>M</strong>eet <strong>L</strong>adies... <em>What?</em> That aint what HTML stands for? Man...');
			    $('img.image1').data('ad-title', 'Title through $.data');
			    $('img.image4').data('ad-desc', 'This image is wider than the wrapper, so it has been scaled down');
			    $('img.image5').data('ad-desc', 'This image is higher than the wrapper, so it has been scaled down');
			    var galleries = $('.ad-gallery').adGallery();
			    $('#switch-effect').change(
			      function() {
			        galleries[0].settings.effect = $(this).val();
			        return false;
			      }
			    );
			    $('#toggle-slideshow').click(
			      function() {
			        galleries[0].slideshow.toggle();
			        return false;
			      }
			    );
			    $('#toggle-description').click(
			      function() {
			        if(!galleries[0].settings.description_wrapper) {
			          galleries[0].settings.description_wrapper = $('#descriptions');
			        } else {
			          galleries[0].settings.description_wrapper = false;
			        }
			        return false;
			      }
			    );
			  });
  		</script>
	</head>
	<body onload="createCode()">
		<div id="container_wrapper">
			<div id="container">
				<!-- header -->
				<jsp:include page="header.jsp" flush="true"></jsp:include>


				<div id="content">
					<div id="leftcolumn">


						<c:choose>
							<c:when test="${requestScope.ARTICLE eq null}">
								<h1>对不起！数据已经丢失！</h1>
							</c:when>
							<c:otherwise>
								<div class="post">
									<div>
										<br />
										<div align="center">
											<font size="3" color="black">${requestScope.ARTICLE.articleTitle}</font>
										</div>
										<br />
										<div align="center">
											文章类型：
											<span>${requestScope.ARTICLE.articleStyleName}</span>&nbsp;&nbsp;
											文章来源：
											<span>${requestScope.ARTICLE.articleSource}</span>&nbsp;&nbsp;
											作者：
											<span>${requestScope.ARTICLE.authorName}</span>&nbsp;&nbsp;
											发表时间：
											<span><fmt:formatDate
													value="${requestScope.ARTICLE.articleCreateTime }"
													pattern="yyyy/MM/dd" /> </span>
										</div>
										<br />
										<c:if test="${requestScope.AFILE ne null}">
											<!-- 画廊模块 -->
											<div id="container">
												<div id="gallery" class="ad-gallery">
													<div class="ad-image-wrapper">
													</div>
													<div class="ad-controls">
													</div>
													<div class="ad-nav">
														<div class="ad-thumbs">
															<ul class="ad-thumb-list">
																<c:forEach var="articleFile"
																	items="${requestScope.AFILE}" varStatus="status">
																	<li>
																		<a href="${ctx}${articleFile.articleFileUrl}"> <img
																				src="${ctx}${articleFile.articleFileUrl }"
																				width="90" height="60" /> </a>
																	</li>
																</c:forEach>
															</ul>
														</div>
													</div>
												</div>
											</div>
										</c:if>
										<br />

										<div>
											${requestScope.ARTICLE.articleContent}
											<br />
											<div class="comment_more">
												#
												<a href="#">更多文章</a>
											</div>
										</div>
									</div>
								</div>
							</c:otherwise>
						</c:choose>
						<br />
					</div>
					<!-- rightcolumn -->
					<jsp:include page="rightcolumn.jsp" flush="true"></jsp:include>
				</div>

				<!-- comment -->
				<jsp:include page="comment.jsp" flush="true"></jsp:include>
				<!--footer  -->
				<jsp:include page="footer.jsp" flush="true"></jsp:include>

			</div>
		</div>
	</body>
</html>
